﻿using SnakeRemote.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SnakeRemote.Views.Converters
{
    public class SnakeMovingStateToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (SnakeMovingState)value switch {
                SnakeMovingState.StayStill => "停止",
                SnakeMovingState.MoveForward => "向前",
                SnakeMovingState.MoveBackward => "向后",
                SnakeMovingState.MoveLeftward => "向左",
                SnakeMovingState.MoveRightward => "向右",
                _ => "未知"
            };
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
